//
//  ViewController.swift
//  LSFastFolderDemo
//
//  Created by LuckyStrike on 2017/11/8.
//  Copyright © 2017年 LuckyStrike. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        print(NSHomeDirectory())
        //测试data
        let data = UIImagePNGRepresentation(UIImage(named:"luckystrike")!)!
        //data所在文件夹路径
        let dataFolderPath = FastCaches.folderFC("DataFolder")
        //data文件路径
        let dataFilePath = dataFolderPath.fileFC("ImageData")
        //测试字典
        let dic : [String : Any] = ["姓名":"张三","年龄":25]
        //字典所在文件夹路径
        let dicFolderPath = FastTmp.folderFC("DicFolder")
        //字典文件路径
        let dicFilePath = dicFolderPath.fileFC("InfoDic")
        
        //存入数据
        dataFilePath.saveFC(data: data)
        dicFilePath.saveFC(dic: dic)
        //打印文件夹大小
        print(dataFolderPath.sizeFC())
        //打印文件大小（单位为B）
        print(dicFilePath.sizeFC())
        //打印文件夹下所有文件名
        print(dataFolderPath.contentsFC()!)
        //打印文件上次修改到现在的时间（单位为秒）
        print(dataFilePath.lastedFC())
        
        
        
//        path.clearFC()
        
        
        
        
        
    }
}
